package com.yanqu.road.entity.activity.unionwar.cross;

import com.alibaba.fastjson.JSON;
import com.yanqu.road.entity.DataObject;
import com.yanqu.road.entity.union.UnionBaseInfo;

import java.util.Objects;

public class CrossUnionWarSimple extends DataObject {
    private int activityId;
    private String unionUid;
    private int score1;       //积分赛
    private int score2;       //决赛赛
    private UnionBaseInfo unionBaseInfo;      //商会信息
    private long modifyTime;          //变更时间
    private int no;                   //积分赛排名（编号)
    private int groupId;
    private long commander;           //指挥官

    public int getActivityId() {
        return activityId;
    }

    public void setActivityId(int activityId) {
        if(this.activityId != activityId) {
            this.activityId = activityId;
            setUpdateOption();
        }
    }

    public String getUnionUid() {
        return unionUid;
    }

    public void setUnionUid(String unionUid) {
        if(!Objects.equals(this.unionUid, unionUid)) {
            this.unionUid = unionUid;
            setUpdateOption();
        }
    }

    public int getScore1() {
        return score1;
    }

    public void setScore1(int score1) {
        if(this.score1 != score1) {
            this.score1 = score1;
            setUpdateOption();
        }
    }

    public int getScore2() {
        return score2;
    }

    public void setScore2(int score2) {
        if(this.score2 != score2) {
            this.score2 = score2;
            setUpdateOption();
        }
    }

    public String getUnionBaseInfoJsonStr(){
        if(null == unionBaseInfo){
            return "";
        }else {
            return JSON.toJSONString(unionBaseInfo);
        }
    }

    public UnionBaseInfo getUnionBaseInfo() {
        return unionBaseInfo;
    }

    public void setUnionBaseInfo(UnionBaseInfo unionBaseInfo) {
        this.unionBaseInfo = unionBaseInfo;
        setUpdateOption();
    }

    public long getModifyTime() {
        return modifyTime;
    }

    public void setModifyTime(long modifyTime) {
        this.modifyTime = modifyTime;
    }

    public int getNo() {
        return no;
    }

    public void setNo(int no) {
        if(this.no != no) {
            this.no = no;
            setUpdateOption();
        }
    }

    public int getGroupId() {
        return groupId;
    }

    public void setGroupId(int groupId) {
        if(this.groupId != groupId){
            this.groupId = groupId;
            setUpdateOption();
        }
    }

    public long getCommander() {
        return commander;
    }

    public void setCommander(long commander) {
        if(this.commander != commander) {
            this.commander = commander;
            setUpdateOption();
        }
    }
}
